package com.schoolCommunity.controller;


import com.schoolCommunity.entity.Information;
import com.schoolCommunity.service.CommodityTransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author YTH
 * @since 2020-10-10
 */
@CrossOrigin
@RestController
public class CommodityTransactionController {

    @Autowired
    private CommodityTransactionService commodityTransactionService;

    //根据购买人的id查询购买记录
    @GetMapping("/GetCommodityTransactionById/{memberId}")
    public Information GetCommodityTransactionById(@PathVariable("memberId") long memberId) {
        return commodityTransactionService.GetCommodityTransactionById(memberId);
    }

}

